package com.transfiguro;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import javax.swing.*;

public class CSFileView implements Runnable{
    private final Logger logger = LoggerFactory.getLogger(JavaFileView.class);
    public JEditorPane getEditorPane() {
        return editorPane;
    }

    private JEditorPane editorPane;
    private JScrollPane scrollPane;

    public CSFileView() {
        editorPane = new JEditorPane();
        scrollPane = new JScrollPane(editorPane);
        //DefaultSyntaxKit.initKit();
        //scrollPane.setSize(500, 500);
        Thread thread = new Thread(this);
        thread.start();
    }

    /**private void editorKeyPressed(final KeyEvent keyEvent) {
     setChanged();
     notifyObservers(keyEvent);
     }*/

    public JScrollPane getScrollPane() {
        return scrollPane;
    }

    @Override
    public void run() {
        editorPane.setDragEnabled(true);
        editorPane.setEditable(false);
    }
}
